<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="jslib/vue.min.js" type="text/javascript" charset="utf-8"></script>
		
	</head>
	<body>
		<div id="app">
			<v-header></v-header>
		</div>
		<template id="header">
			<header ref="header">
				<h1>这里是头部标签--------</h1>
				<p ref="pmsg">{{msg}}</p>
			</header>
		</template>
	</body>
	<script type="text/javascript">

		var  vw = new Vue({
			el:"#app",
			data:{
			},
			components:{
				"v-header":{
					template:"#header",
					data:function(){
						return {
							msg:"你会显示吗"
						}
					},
					mounted:function(){
						this.msg = "我也不知道";
//						this.$nextTick(function(){
//							console.log(this.$refs.pmsg.textContent)
////						}.bind(this))
						this.$nextTick(()=>{
							console.log(this.$refs.pmsg.textContent)
						})
//						console.log(this.$refs.pmsg.textContent)
					}
				}
			}
			
		})
	</script>
</html>
